#!/bin/bash
#2020年2月10日22:00:30
#auto install nginx web
#by author www.jfedu.net
########################
NGX_VER="1.16.0"
NGX_SRC="nginx-${NGX_VER}"
NGX_YUM="yum install -y"
NGX_DIR="/usr/local/nginx"
NGX_SOFT="nginx-${NGX_VER}.tar.gz"
NGX_URL="http://nginx.org/download"
NGX_ARGS="--user=www --group=www --with-http_stub_status_module"
$NGX_YUM gcc pcre pcre-devel zlib zlib-devel
$NGX_YUM wget make openssl-devel net-tools
wget -c $NGX_URL/$NGX_SOFT
tar -xzvf $NGX_SOFT
cd $NGX_SRC
useradd -s /sbin/nologin www -M
./configure --prefix=$NGX_DIR $NGX_ARGS
make
make install
$NGX_DIR/sbin/nginx
ps -ef|grep nginx
netstat -ntl|grep 80
setenforce 0
systemctl stop firewalld.service
